var headers = parseHeaders(<><![CDATA[
// ==UserScript==
// @name          Header parser
// @namespace     http://ecmanaut.googlecode.com/
// @description   A quick E4X hack
]]></>.toXMLString().split(/[\r\n]+/).filter(/\/\/ @/));

function parseHeaders(all) {
  var headers = {}, name, value;
  for each (var line in all) {
    [line, name, value] = line.match(/\/\/ @(\S+)\s*(.*)/);
    headers[name] = value;
  }
  return headers;
}

unsafeWindow.headers = headers;
